package com.the9tcat.everydayapp;

import com.the9tcat.everydayapp.data.Common;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class DataChangeReceiver extends BroadcastReceiver {

	@Override
	public void onReceive(Context con, Intent intent) {
		if (intent.getAction() == Common.ACTION_SYNC_SUCCEED) {
			Log.d("***", "Finished sync, updated.");
			con.stopService(new Intent(con, AppService.class));
			con.startService(new Intent(con, AppService.class));
		}
	}
}
